package com.module.oa.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.module.oa.mapper.PerformancerecordMapper;
import com.module.oa.domain.Performancerecord;
import com.module.oa.service.IPerformancerecordService;

/**
 * 绩效考核记录Service业务层处理
 * 
 * @author hezhengxian
 * @date 2023-09-12
 */
@Service
public class PerformancerecordServiceImpl implements IPerformancerecordService 
{
    @Autowired
    private PerformancerecordMapper performancerecordMapper;

    /**
     * 查询绩效考核记录
     * 
     * @param eecordId 绩效考核记录主键
     * @return 绩效考核记录
     */
    @Override
    public Performancerecord selectPerformancerecordByEecordId(Long eecordId)
    {
        return performancerecordMapper.selectPerformancerecordByEecordId(eecordId);
    }

    /**
     * 查询绩效考核记录列表
     * 
     * @param performancerecord 绩效考核记录
     * @return 绩效考核记录
     */
    @Override
    public List<Performancerecord> selectPerformancerecordList(Performancerecord performancerecord)
    {
        return performancerecordMapper.selectPerformancerecordList(performancerecord);
    }

    /**
     * 新增绩效考核记录
     * 
     * @param performancerecord 绩效考核记录
     * @return 结果
     */
    @Override
    public int insertPerformancerecord(Performancerecord performancerecord)
    {
        performancerecord.setCreateTime(DateUtils.getNowDate());
        return performancerecordMapper.insertPerformancerecord(performancerecord);
    }

    /**
     * 修改绩效考核记录
     * 
     * @param performancerecord 绩效考核记录
     * @return 结果
     */
    @Override
    public int updatePerformancerecord(Performancerecord performancerecord)
    {
        performancerecord.setUpdateTime(DateUtils.getNowDate());
        return performancerecordMapper.updatePerformancerecord(performancerecord);
    }

    /**
     * 批量删除绩效考核记录
     * 
     * @param eecordIds 需要删除的绩效考核记录主键
     * @return 结果
     */
    @Override
    public int deletePerformancerecordByEecordIds(Long[] eecordIds)
    {
        return performancerecordMapper.deletePerformancerecordByEecordIds(eecordIds);
    }

    /**
     * 删除绩效考核记录信息
     * 
     * @param eecordId 绩效考核记录主键
     * @return 结果
     */
    @Override
    public int deletePerformancerecordByEecordId(Long eecordId)
    {
        return performancerecordMapper.deletePerformancerecordByEecordId(eecordId);
    }
}
